//
//  HeroMainCollectionCell.m
//  MyDota
//
//  Created by 濮亚军 on 15/12/3.
//  Copyright © 2015年 濮亚军. All rights reserved.
//

#import "HeroMainCollectionCell.h"
@interface HeroMainCollectionCell()

//自定义cell上的label
@property(nonatomic, strong)UILabel *titleLabel;

@end
@implementation HeroMainCollectionCell
#pragma mark --------重写init 自定义cell--------
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        CGFloat width = kScreenWidth / 6;
        CGFloat height = 35 * kHProportion;
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, width, height)];
        self.titleLabel.backgroundColor = [UIColor whiteColor];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        //self.titleLabel.text = @"幻刺";
        self.titleLabel.font = [UIFont systemFontOfSize:kScreenWidth / 20];
        [self.contentView addSubview:_titleLabel];
    }
    return self;
}
-(void)setTitle:(NSString *)title
{
    self.titleLabel.text = title;
}
@end
